// 路由文件
// 路由列表


import MainPage from "../pages/Main/MainPage";
import Login from '../pages/Login/Login';
// 后台的管理员
import Huodongguanli from '../pages/Guanliyuan/Huodongguanli';
import Pintuanguanli from '../pages/Guanliyuan/Pintuanguanli';
import Shangpinguanli from '../pages/Guanliyuan/Shangpinguanli';
import Putongdingdan from '../pages/Guanliyuan/Putongdingdan';
import Pintuanliebiao from '../pages/Guanliyuan/Pintuanliebiao';
import Tuikuandingdan from '../pages/Guanliyuan/Tuikuandingdan';
import Youhuiquanguanli from  '../pages/Guanliyuan/Youhuiquanguanli';
import Shangjiaguanli from  '../pages/Guanliyuan/Shangjiaguanli';
import Kehuguanli from "../pages/Guanliyuan/Kehuguanli";
import Shujufenxi from '../pages/Guanliyuan/Shujufenxi'
import Yuangongguanli from "../pages/Shangjia/Yuangongguanli";

// 商家的
import groupManage from '../pages/Shangjia/Pintuanguanli';
import gruopList from '../pages/Shangjia/Pintuanliebiao';
import regularOrder from '../pages/Shangjia/Putongdingdan';
import goodsManage from '../pages/Shangjia/Shangpinguanli';
import dataAnalysis from "../pages/Shangjia/Shujufenxi";
import refundOrder from '../pages/Shangjia/Tuikuandingdan';
import newsManage from "../pages/Shangjia/Xiaoxiguanli";
import couponsManage from '../pages/Shangjia/Youhuiquanguanli'
import employeeManage from '../pages/Shangjia/Yuangongguanli'

// 运营者
import groupManage1 from '../pages/Yunyingzhe/Pintuanguanli';
import groupList1 from '../pages/Yunyingzhe/Pintuanliebiao';
import regularOrder1 from '../pages/Yunyingzhe/Putongdingdan';
import goodsManage1 from '../pages/Yunyingzhe/Shangpinguanli';
import refundOrder1 from '../pages/Yunyingzhe/Tuikuandingdan';
import couponsManage1 from '../pages/Yunyingzhe/Youhuiquanguanli';

// 客服
import groupList2 from '../pages/Kefu/Pintuanliebiao';
import regularOrder2 from '../pages/Kefu/Putongdingdan';
import goodsManage2 from '../pages/Kefu/Shangpinguanli';
import refundOrder2 from '../pages/Kefu/Tuikuandingdan';
import newsManage2 from  '../pages/Kefu/Xiaoxiguanli'

export default [
    {
        path: '/',
        name: '登录',
        redirect: '/LoginList',
        meta: {
            require: false
        }
    },
    {
        path:'/LoginList',
        name:'登录',
        component:Login,
        meta:{
            require:false
        }
    },
    {
        path: '/myNav',
        name: '主入口',
        component: MainPage,
        redirect: '/myNav/dataAnalysis',
        meta: {
            require: true
        },
        // 权限：那些可以进入
        role: ['admin', 'merchants', 'service', 'operate'],
        children: [
            {
                path: '/myNav/activityManage',
                name: '活动管理',
                component: Huodongguanli,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/customerManage',
                name: '客户管理',
                component: Kehuguanli,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/groupManage',
                name: '拼团管理',
                component: Pintuanguanli,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/groupList',
                name: '拼团列表',
                component: Pintuanliebiao,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/regularOrder',
                name: '普通订单',
                component: Putongdingdan,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/merchantsManage',
                name: '商家管理',
                component: Shangjiaguanli,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/goodsManage',
                name: '商品管理',
                component: Shangpinguanli,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/dataAnalysis',
                name: '数据分析',
                component: Shujufenxi,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/employeeManage',
                name: '商家员工管理',
                component: Yuangongguanli,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/refundOrders',
                name: '退款订单',
                component: Tuikuandingdan,
                meta: {
                    require: true
                },
                role: ['admin']
            },
            {
                path: '/myNav/couponsManage',
                name: '优惠券管理',
                component: Youhuiquanguanli,
                meta: {
                    require: true
                },
                role: ['admin']
            },

            // 商家的
            {
                path:'/myNav/groupManage1',
                name:'拼团管理1',
                component:groupManage,
                meta:{
                    require: true
                },
                role:['merchants']
            },
            {
                path:'/myNav/groupList1',
                name:'拼团列表1',
                component:gruopList  ,
                meta:{
                    require: true
                },
                role:['merchants']
            },
            {
                path:'/myNav/regularOrder1',
                name:'普通订单1',
                component:regularOrder,
                meta:{
                    require: true
                },
                role:['merchants']
            },
            {
                path:'/myNav/goodsManage1',
                name:'商品管理1',
                component:goodsManage,
                meta:{
                    require: true
                },
                role:['merchants']
            },
            {
                path:'/myNav/dataAnalysis1',
                name:'数据分析1',
                component:dataAnalysis,
                meta:{
                    require: true
                },
                role:['merchants']
            },
            {
                path:'/myNav/refundOrder1',
                name:'退款订单1',
                component:refundOrder,
                meta:{
                    require: true
                },
                role:['merchants']
            },
            {
                path:'/myNav/newsManage1',
                name:'消息管理1',
                component:newsManage,
                meta:{
                    require: true
                },
                role:['merchants']
            },
            {
                path:'/myNav/couponsManage1',
                name:'优惠券管理1',
                component:couponsManage,
                meta:{
                    require: true
                },
                role:['merchants']
            },
            {
                path:'/myNav/employeesManage1',
                name:'商家员工管理1',
                component:employeeManage,
                meta:{
                    require:true
                },
                role:['merchants']
            },

            // 运营者的
            {
                path:'/myNav/groupList2',
                name:'拼团列表2',
                component:groupList1,
                meta:{
                    require: true
                },
                role:['operate']
            },
            {
                path:'/myNav/regularOrder2',
                name:'普通订单2',
                component:regularOrder1,
                meta:{
                    require: true
                },
                role:['operate']
            },
            {
                path:'/myNav/goodsManage2',
                name:'商品管理2',
                component:goodsManage1,
                meta:{
                    require: true
                },
                role:['operate']
            },
            {
                path:'/myNav/refundOrder2',
                name:'退款订单2',
                component:refundOrder1,
                meta:{
                    require: true
                },
                role:['operate']
            },
            {
                path:'/myNav/couponsManage2',
                name:'优惠券管理2',
                component:couponsManage1,
                meta:{
                    require: true
                },
                role:['operate']
            },
            {
                path:'/myNav/groupManage2',
                name:'拼团管理2',
                component:groupManage1,
                meta:{
                    require: true
                },
                role:['operate']
            },

            // 客服的
            {
                path:'/myNav/groupList3',
                name:'拼团列表3',
                component:groupList2,
                meta:{
                    require: true
                },
                role:['service']
            },
            {
                path:'/myNav/regularOrder3',
                name:'普通订单3',
                component:regularOrder2,
                meta:{
                    require: true
                },
                role:['service']
            },
            {
                path:'/myNav/goodsManage3',
                name:'商品管理3',
                component:goodsManage2,
                meta:{
                    require: true
                },
                role:['service']
            },
            {
                path:'/myNav/refundOrder3',
                name:'退款订单3',
                component:refundOrder2,
                meta:{
                    require: true
                },
                role:['service']
            },
            {
                path:'/myNav/newsManage3',
                name:'消息管理3',
                component:newsManage2,
                meta:{
                    require: true
                },
                role:['service']
            }


        ]
    },
]